package com.yao.shop.service.impl;

import com.yao.shop.mapper.SysLogMapper;
import com.yao.shop.pojo.SysLog;
import com.yao.shop.service.SysLogService;
import com.yao.shop.utils.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SysLogServiceImpl implements SysLogService {

    @Autowired
    private SysLogMapper sysLogMapper;
    @Autowired
    private IdWorker idWorker;

    @Override
    public void save(SysLog sysLog) {
        sysLog.setLogId(idWorker.nextId()+"");
        sysLog.setCreatedBy("admin");
        sysLogMapper.save(sysLog);

    }
}
